/* FATFONT.c by bill buckels 2007         */
/* a graphics demo for the apple //e      */
/* written in Manx Aztec C65 Version 3.2b */
/* runs under PRODOS 8                    */


#define TEXTMODE  0
#define GRAFMODE  2  /* graphics only           */

#define clearscreen() fbox(0,0,39,191,0)
int getch();

#define BOX '\x01'
#define BLUE  1
#define RED   2
#define WHITE 3


char *title=" FATFONT font demo by Bill Buckels ";

char *fontdesc=" Apple II Font by Bill Buckels ";

char *s1="You have a choice of loading a font";
char *s2="from disk or from memory. They are";
char *s3="identical as shown below and offer";
char *s4="letters and special characters,";
char *s5="and use Ascii Values from 32-169.";

char *press=" Press Any Key to Exit ";

main()
{
	int c, ch, x, y;

	setcrtmode(GRAFMODE);

	clearscreen();
	fontlode(); /* save memory by loading a disk font */

    drawline(0,0,279,191,BLUE,BOX);

    plots2(title,2,0,4);

    x = 3;
	y = 20;

    drawline(4,y-4,279-4,y+43,RED,BOX);

    plots(s1,x,y,1);  y+=8; /* uses memory font */
    plots2(s2,x,y,1); y+=8; /* uses disk font */
    plots(s3,x,y,1);  y+=8;
    plots2(s4,x,y,1); y+=8;
    plots(s5,x,y,1);  y+=36;


    drawline(4,y-10,279-4,y+83,WHITE,BOX);
    plots2(fontdesc,4,y-14,4);

    ch = 33;
	for (c = 1; c < 137; c++) {

	  plotchar2(ch,x,y);
	  plotchar(ch, x, y+8);
	  x++;
	  ch++;

	  if (x > 36) {
	     x = 3;
	     y+= 20;
	  }

	}

    plots2(press,8,184,4);

	c=getch();

	setcrtmode(TEXTMODE);
    _exit();

}




